{% extends 'layout.tpl' %} {% block title %} {{ title }} {% endblock %} {% block content %}

<h2>{{ title }}.</h2>

<div class="row">
    <form action="" method="POST" class="form-inline" role="form">

        <div class="btn-group">
            <a class="btn btn-primary" href="/redis/append" role="button">创建Redis</a>
        </div>
        <div class="form-group">
            <label class="sr-only" for="">域名</label>
            <input type="text" class="form-control" id="txtDomian" placeholder="Domain Name">
        </div>

        <div class="form-group">
            <label class="sr-only" for="">IP</label>
            <input type="text" class="form-control" id="txtIPAddress" placeholder="IP Address">
        </div>
        <button type="submit" class="btn btn-primary">查询</button>
    </form>
</div>
 
<hr>
<div class="row">

    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>
                    域名
                </th>
                <th>
                    IP地址
                </th>
                <th>
                    活动状态
                </th>
                <th>
                    登录用户
                </th>
                <th>
                    备注
                </th>
                <th>
                    更新时间
                </th>
                <th>
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
            {% for item in data %}
            <tr>
                <td>
                    {{ item.DomainName }}
                </td>
                <td>
                    {{ item.IPAddress}}
                </td>
                <td>
                    %if item.Used:
                    <span class="label label-primary">启用</span>
                    %else:
                    <span class="label label-default">未开通</span>
                    %end
                </td>
                <td>
                    {{ item.Username}}
                </td>
                <td>
                    {{ item.Note}}
                </td>
                <td>
                    {{ item.updated_time }}
                </td>
                <td>
                    <a href="/redis/edit/{{ item.Redis_Id }}" class="btn  btn-small btn-waring">编辑</a>
                    <a href="/redis/delete/{{ item.Redis_Id }}" class="btn  btn-small btn-waring">删除</a>
                </td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>



<script type="text/javascript">
    $(function () {

    });
</script>
{% endblock %}